package com.ux.example
{
	import com.ux.effect.Rain;
	import com.ux.effect.Snow;
	
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	
	public class RainEffectTest extends Sprite
	{
		
		private var rain : Rain;
		private var isPlay : Boolean = false;
		public var weatherClip : MovieClip;
		
		public function RainEffectTest()
		{
			super();
			
			
			rain = new Rain( weatherClip.width, weatherClip.height );
			weatherClip.addChild( rain );
			
			stage.addEventListener( MouseEvent.CLICK, onClick );

			
		}
		
		
		private function onClick( e:MouseEvent ):void 
		{
			if( isPlay ) 
			{
				isPlay = false;
				rain.stop();
			}
			else
			{
				isPlay = true;
				rain.play();
			}
		}
		
	}
}